package com.unireport.dbbean;

// Generated 2012-5-2 22:17:44 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * WebjobRpRelation generated by hbm2java
 */
@Entity
@Table(name = "WEBJOB_RP_RELATION", schema = "DATAMANAGER")
@SequenceGenerator(name="seq_webjob_rp_relation", sequenceName="seq_webjob_rp_relation",allocationSize=1)
public class WebjobRpRelation implements java.io.Serializable {

	private int RId;
	private WebjobRpDef webjobRpDef;
	private WebjobSyncDef webjobSyncDef;

	public WebjobRpRelation() {
	}

	public WebjobRpRelation(int RId, WebjobRpDef webjobRpDef,
			WebjobSyncDef webjobSyncDef) {
		this.RId = RId;
		this.webjobRpDef = webjobRpDef;
		this.webjobSyncDef = webjobSyncDef;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_webjob_rp_relation")
	@Column(name = "R_ID", unique = true, nullable = false, precision = 8, scale = 0)
	public int getRId() {
		return this.RId;
	}

	public void setRId(int RId) {
		this.RId = RId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RP_ID", nullable = false)
	public WebjobRpDef getWebjobRpDef() {
		return this.webjobRpDef;
	}

	public void setWebjobRpDef(WebjobRpDef webjobRpDef) {
		this.webjobRpDef = webjobRpDef;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "JOB_ID", nullable = false)
	public WebjobSyncDef getWebjobSyncDef() {
		return this.webjobSyncDef;
	}

	public void setWebjobSyncDef(WebjobSyncDef webjobSyncDef) {
		this.webjobSyncDef = webjobSyncDef;
	}

}
